package com.squirrel.common.shiro;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @Description JwtToken 将string类型的token转成AuthenticationToken类型，供shiro使用
 * @Author 关远键
 * @Version v1.0.0
 * @Date 2021/12/13 10:03
 */
public class JwtToken implements AuthenticationToken {

    private String token;

    public JwtToken(String token) {
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }

}
